#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif

#include "UIEventRouter.h"
#include "UIIdentityManager.h"

int main( int argc, char **argv )
{
	UILogger::create(LOGGER_LOG4CXX, "../Common/Resources/Logging/logging-log4cxx.config");
	UIConfigResourceManager::create("../Common/Resources/main-SmartHome.config", "./usersetting.config");

	UIIdentityManager identifier;

	UIEvent event;
	event.setSender(MODULE_IdentityManager);
	event.setReciever(MODULE_IdentityManager);
	event.setType("TEST");
	event.setValue("");

	char t;
	int result;
	result = scanf("%c", &t);
	if (result) return 1;
	while (t != 'q') {
		switch (t) {
			case 's':
				UIEventRouter::getInstance()->sendEvent(&event);
				break;
			default:
				break;
		}
		result = scanf("%c", &t);
		if (result) return 1;
	}

	UIConfigResourceManager::release();
	UIEventRouter::release();
	UILogger::release();
}
